var orderId = getQuery("orderId")
window.onload=function () {
    initCustomOrder(orderId)

}
function initCustomOrder(orderId){
    axios.get("/order/getOrder",{
        params:{
            orderId
        }
    }).then(resp =>{
        var info = resp.data;
        $('cOrderId').innerHTML = info.id
        $('cAccept').innerHTML = info.name
        $('cAddress').innerHTML = info.address
        $('cPhone').innerHTML = info.phone
        $('cDate').innerHTML = info.date
        $('cTotal').innerHTML = info.money
        $('cStatus').innerHTML = info.status
        var str = ""
        info.infoBeans.forEach(n =>{
            console.log(n)
            str += `<tr><td>${n.product.id}</td><td>${n.product.name}</td><td>${n.product.price}</td><td>${n.num}</td></tr>`
        })

        $('cInfo').innerHTML = str
    })
}

function customBack(){
location.href = "/custom/findOrder.html?orderId="+orderId
}